package com.scy.hospitalmanager.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.scy.hospitalmanager.dao.administratordao.NurseMsgDao;
import com.scy.hospitalmanager.dao.nursedao.NurseTransitionDao;
import com.scy.hospitalmanager.pojo.*;
import com.scy.hospitalmanager.service.NurseMsgService;
import com.scy.hospitalmanager.until.GetPageNum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Song_can_yu
 * @ClassName PatientPhysicianOrder
 * @Date 2021-08-07-17:21
 * @PackageName com.scy.hospitalmanager.pojo
 * @Description 实现护士信息管理模块
 */
@Service
public class NurseMsgServiceImpl implements NurseMsgService {
    @Autowired
    private NurseMsgDao nurseMsgDao;
    @Autowired
    private NurseTransitionDao nurseTransitionDao;
    @Override
    public PageInfo<Nurse> getAllNurses(GetPageNum getPageNum) {
        PageHelper.startPage(getPageNum.getPageNo(),getPageNum.getPageSize());//
        List<Nurse>nurseList=nurseMsgDao.getAllNurseMsg();
        PageInfo<Nurse> pageInfo=new PageInfo<>(nurseList);
        return pageInfo;
    }

    @Override
    public Nurse getNurseById(Nurse nurse) {
        return nurseMsgDao.getNurseById(nurse);
    }

    @Override
    public Integer updateNurseMsgById(Nurse nurse) {
        return nurseMsgDao.updateNurseMsgById(nurse);
    }

    @Override
    public Integer insertNurse(Nurse nurse) {
        return nurseMsgDao.insertNurseMsg(nurse);
    }

    @Override
    public Integer deleteNurseMsgById(Nurse nurse) {
        return nurseMsgDao.deleteNurseMsgById(nurse);
    }

    @Override
    public List<AllDepartment> getAllDep() {
        return nurseMsgDao.getAllDep();
    }

    @Override
    public List<NursePost> getAllPost() {
        return nurseMsgDao.getAllPost();
    }

    @Override
    public List<NurseQualification> getAllQual() {
        return nurseMsgDao.getAllQual();
    }

    @Override
    public List<NurseTransition> getAllNurseTransition() {
        return nurseTransitionDao.getAllNurseTransition();
    }
}
